// store/modules/counter.js
export default {
    namespaced: true,
    state: () => ({
      count: 0
    }),
    mutations: {
      increment(state) {
        state.count++;
      },
      decrement(state) {
        state.count--;
      }
    },
    actions: {
      incrementAsync({ commit }) {
        setTimeout(() => {
          commit('increment');
        }, 1000);
      }
    },
    getters: {
      count: (state) => state.count
    }
  };
  